package com.cliff.joinus.service;

import org.cybergarage.upnp.Action;
import org.cybergarage.upnp.control.ActionListener;
import org.cybergarage.upnp.std.av.renderer.MediaRenderer;

import com.cliff.joinus.JoinusRenderer;

import android.app.Service;
import android.content.Intent;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Process;
import android.widget.Toast;

public class RendererService extends Service implements ActionListener {

	protected final String TAG = "RendererService";

	@Override
	public IBinder onBind(Intent arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void onCreate() {
		// TODO Auto-generated method stub
		super.onCreate();
		JoinusRenderer.getInstance().startAtBackground();
	}

	@Override
	public void onDestroy() {
		// TODO Auto-generated method stub
		JoinusRenderer.getInstance().stopAtBackground();
		super.onDestroy();
	}

	@Override
	public boolean actionControlReceived(Action action) {
		// TODO Auto-generated method stub
		Toast.makeText(this, "action.getName()="+action.getName(), Toast.LENGTH_SHORT).show();
		return false;
	}

}
